﻿namespace DungeonGenerator.Java
{
	using System;

	public class FeatureSite
	{
		readonly int _newx;

		readonly int _newy;

		readonly int _xmod;

		readonly int _ymod;

		readonly Direction _dir;




		public FeatureSite(int newx, int newy, int xmod, int ymod, Direction dir)
		{
			this._newx = newx;
			this._newy = newy;
			this._xmod = xmod;
			this._ymod = ymod;
			this._dir = dir;
		}

		public FeatureSite(int newx, int newy, Direction dir)
		{

			this._newx = newx;
			this._newy = newy;
			this._dir = dir;
			switch (dir)
			{
				case Direction.North:

					this._ymod = -1;
					break;
				case Direction.East:
					this._xmod = 1;

					break;
				case Direction.South:

					this._ymod = 1;
					break;
				case Direction.West:
					this._xmod = -1;

					break;
				default:
					throw new InvalidOperationException();
			}

		}

		public int newx
		{
			get
			{
				return this._newx;
			}
		}

		public int newy
		{
			get
			{
				return this._newy;
			}
		}

		public int xmod
		{
			get
			{
				return this._xmod;
			}
		}

		public int ymod
		{
			get
			{
				return this._ymod;
			}
		}

		public Direction Dir
		{
			get
			{
				return this._dir;
			}
		}

	}
}